package com.tcm.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tcm.entity.Teacher;
import com.tcm.entity.dto.TeacherUpdateDto;
import com.tcm.entity.vo.TeacherListResult;
import com.tcm.exception.DatabaseOperationException;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author Guqier
 * @version 1.0
 * @date 2023/7/2 16:24
 */
public interface TeacherService extends IService<Teacher> {
    @Transactional
    boolean addTeacherInfo(TeacherUpdateDto teacherDto, String accessToken);

    List<TeacherListResult> getTeacherList();

    boolean removeTeacherById(Long userId, String teacherId) throws DatabaseOperationException;

    @Transactional
    boolean removeTeacherBatchById(List<String> ids, Long currUserId) throws DatabaseOperationException;

    @Transactional
    boolean modifyTeacherInfo(TeacherUpdateDto teacherUpdateDto, Long currUserId) throws DatabaseOperationException;

    Teacher getTeacherByAccount(String account);

    List<TeacherListResult> transferTeacherToListResult(List<Teacher> teachers);
}
